#ifndef _POINT_H
#define _POINT_H

#include "mtxlib.h"
#include <bitset>
#include <vector>

class Triangle;

class Point{
	private:
		std::bitset<8> id;
		vector3 position;
		vector3 normal;
		std::vector< Triangle *> triangles;

	public:
		Point(std::bitset<8> initID, vector3 initPos, vector3 initNorm = vector3(0, 0, 0))
			:id(initID), position(initPos), normal(initNorm){
			
		}

		~Point(){

		}

		friend bool operator == (const Point &a, const Point &b) {
			return((a.id == b.id) && (a.position == b.position));
		}

		std::bitset<8> getID(){
			return id;
		}

		vector3 getPosition(){
			return position;
		}

		vector3 getNormal(){
			return normal;
		}

		void addTriangle(Triangle *triangle);

		void calculateNormal();
};

#endif